<%@ page import="java.util.Date" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
  String _id=request.getParameter("_");
  request.setAttribute("now",new Date());
    String jsessionid = session.getId();
%>

<div class="row">
    <div class="col-lg-12">
        <div class="panel">
            <div class="panel-heading header">
                <h3 class="panel-title" id="title">会议安排登记表</h3>
            </div>

            <div style="margin: 10px">

                <!-- Nav tabs -->
                <ul class="nav nav-tabs">
                    <li class="active"><a href="#bsc-tab-1" data-toggle="tab">会议安排登记表</a></li>
                    <c:if test="${meeting.numStatus==1}">
                        <li><a href="#bsc-tab-2" data-toggle="tab">历史副本</a></li>
                        <li><a href="#bsc-tab-3" data-toggle="tab">会议纪要</a></li>
                        <li><a href="#bsc-tab-4" data-toggle="tab">会议考勤</a></li>
                    </c:if>
                </ul>

                <!-- Tabs Content -->
                <div class="tab-content">

                    <div class="tab-pane pad-btm fade in active" id="bsc-tab-1">
                        <!-- BASIC FORM ELEMENTS -->
                        <!--===================================================-->
                        <form id="form_meeting_input" class="panel-body form-horizontal form-padding">
                            <input type="hidden" name="keyId" id="keyId" value="${meeting.id}" />
                            <input type="hidden" name="updateUnid" id="updateUnid" value="${meeting.updateUnid}" />
                            <input type="hidden" name="curDutyId" id="curDutyId" value=""/>

                            <div class="form-group">
                                <label class="col-md-2 control-label">是否外出会议<i class="fa fa-asterisk txt-color-red"></i>
                                </label>
                                <div class="col-md-6">
                                    <input type="text" id="isOut" name="isOut" class="form-control" value="${meeting.isOut==1?"是":"否"}" disabled>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">日程公开<i class="fa fa-asterisk txt-color-red"></i>
                                </label>
                                <div class="col-md-6">
                                    <input type="text" id="isPublic" name="isPublic" class="form-control" value="${meeting.isPublic==1?"是":"否"}" disabled>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">会议名称<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-6">
                                    <input type="text" id="name" name="name" class="form-control" disabled value="${meeting.name}">
                                </div>
                            </div>

                            <div class="form-group div-Hidden">
                                <label class="col-md-2 control-label">开始日期<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-2">
                                    <div class="input-group date">
                                        <input type="text" class="form-control" id="datStart" name="datStart" disabled
                                               value=<fmt:formatDate pattern="yyyy-MM-dd" value="${meeting.datStart}" /> >
                                        <span class="input-group-addon"><i class="ti-calendar"></i></span>
                                    </div>
                                </div>
                                <label class="col-md-2 control-label">开始时间<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-2">
                                    <div class="input-group clockpicker">
                                        <input type="text" class="form-control" id="timStart" name="timStart" disabled
                                               value=<fmt:formatDate pattern="HH:mm" value="${meeting.timStart}" /> >
                                        <span class="input-group-addon"><i class="ti-alarm-clock"></i></span>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group div-Hidden">
                                <label class="col-md-2 control-label">结束日期<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-2">
                                    <div class="input-group date">
                                        <input type="text" class="form-control" id="datEnd" name="datEnd" disabled
                                               value=<fmt:formatDate pattern="yyyy-MM-dd" value="${meeting.datEnd}" /> >
                                        <span class="input-group-addon"><i class="ti-calendar"></i></span>
                                    </div>
                                </div>
                                <label class="col-md-2 control-label">结束时间<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-2">
                                    <div class="input-group clockpicker">
                                        <input type="text" class="form-control" id="timEnd" name="timEnd" disabled
                                               value=<fmt:formatDate pattern="HH:mm" value="${meeting.timEnd}" /> >
                                        <span class="input-group-addon"><i class="ti-alarm-clock"></i></span>
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">会议议题<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-6">
                                    <input type="text" id="subject" name="subject" class="form-control" disabled value="${meeting.subject}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">
                                    会议负责人
                                    <i class="fa fa-asterisk txt-color-red"></i>
                                </label>
                                <div class="col-md-6">
                                    <input type="text" id="userName" name="userName" class="form-control" disabled value="${meeting.chief.name}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">
                                    内部参会人员
                                    <i class="fa fa-asterisk txt-color-red"></i>
                                </label>
                                <div class="col-md-6">
                                    <input type="text" id="userNames" name="userNames" class="form-control" disabled
                                           value="<c:forEach var="item" items="${meeting.participants}" varStatus="status">${item.name}<c:if test="${!status.last}">,</c:if></c:forEach>">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">外部参会人员</label>
                                <div class="col-md-6">
                                    <input type="text" id="outermen" name="outermen" class="form-control" disabled value="${meeting.outermen}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">具体地点<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-6">
                                    <input type="text" id="address" name="address" class="form-control" disabled value="${meeting.address}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-md-2 control-label">会议辅助设备
                                    <span style="display: none" id="aidSetsSpan">${meeting.aidSets}</span>
                                </label>
                                <div class="col-md-6">

                                    <div class="checkbox">
                                        <!-- Inline checkbox buttons -->
                                        <input type="checkbox" name="aidSets" id="aidSets1Selected" class="magic-checkbox" value="01" disabled
                                        <c:if test="${meeting.aidSets.indexOf('01')>-1}"> checked="checked"</c:if> >
                                        <label for="aidSets1Selected">电脑</label>

                                        <input type="checkbox" name="aidSets" id="aidSets2Selected" class="magic-checkbox" value="02" disabled
                                        <c:if test="${meeting.aidSets.indexOf('02')>-1}"> checked="checked"</c:if> >
                                        <label for="aidSets2Selected">投影仪</label>

                                        <input type="checkbox" name="aidSets" id="aidSets3Selected" class="magic-checkbox" value="03" disabled
                                        <c:if test="${meeting.aidSets.indexOf('03')>-1}"> checked="checked"</c:if> >
                                        <label for="aidSets3Selected">激光笔</label>

                                        <input type="checkbox" name="aidSets" id="aidSets4Selected" class="magic-checkbox" value="04" disabled
                                        <c:if test="${meeting.aidSets.indexOf('04')>-1}"> checked="checked"</c:if> >
                                        <label for="aidSets4Selected">白板</label>

                                        <input type="checkbox" name="aidSets" id="aidSets5Selected" class="magic-checkbox" value="05" disabled
                                        <c:if test="${meeting.aidSets.indexOf('05')>-1}"> checked="checked"</c:if> >
                                        <label for="aidSets5Selected">话筒音响</label>

                                        <input type="checkbox" name="aidSets" id="aidSets6Selected" class="magic-checkbox" value="06" disabled
                                        <c:if test="${meeting.aidSets.indexOf('06')>-1}"> checked="checked"</c:if> >
                                        <label for="aidSets6Selected">人名牌</label>

                                        <input type="checkbox" name="aidSets" id="aidSets7Selected" class="magic-checkbox" value="07" disabled
                                        <c:if test="${meeting.aidSets.indexOf('07')>-1}"> checked="checked"</c:if> >
                                        <label for="aidSets7Selected">其他</label>

                                    </div>
                                </div>
                            </div>

                            <div class="form-group" id="otherSetDiv">
                                <label class="col-md-2 control-label">其他辅助设备<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-6">
                                    <input type="text" id="otherSet" name="otherSet" class="form-control" disabled value="${meeting.otherSet}">
                                </div>
                            </div>

            <c:if test="${meeting.txtStatus.equals('已取消')}">
                            <div class="form-group">
                                <label class="col-md-2 control-label">取消原因<i class="fa fa-asterisk txt-color-red"></i></label>
                                <div class="col-md-6">
                                    <input type="text" id="cancelReason" name="cancelReason" class="form-control" disabled value="${meeting.cancelReason}">
                                </div>
                            </div>
            </c:if>

                            <div class="form-group">
                                <label class="col-md-2 control-label">提交人</label>
                                <div class="col-md-2">
                                    <p class="form-control-static">${meeting.creater.name}</p>
                                </div>
                                <label class="col-md-2 control-label">提交日期</label>
                                <div class="col-md-2">
                                    <p class="form-control-static"><fmt:formatDate pattern="yyyy-MM-dd" value="${meeting.dateApply}" /></p>
                                </div>
                            </div>

                            <c:if test='${(meeting.processState=="Running" || meeting.processState=="Backed") && stepNo !=1 && stepNo !=0}'>
                                <div class="form-group" id="comment">
                                    <label class="col-md-2 control-label">审批意见</label>
                                    <div class="col-md-6">
                                        <textarea name="editor" id="editor" style="height:200px;"></textarea>
                                    </div>
                                </div>
                            </c:if>

                            <div class="flow">
                                <div class="panel-footer">
                                    <a class="btn btn-default" id="apply-re-common" href="javascript:void(0)">
                                        <i class="fa fa-lg fa-mail-reply"></i> 返回
                                    </a>
                                    <%--<a class="btn btn-default" key="ajax_edit" href="javascript:void(0);" ${isEdit}>--%>
                                        <%--<i class="fa fa-lg fa-edit"></i> 编辑--%>
                                    <%--</a>--%>
                                    <c:if test="${meeting.processState=='Finished'}">
                                    <a class="btn btn-warning" key="ajax_meeting_cancel" href="javascript:void(0);"><i class="fa fa-lg fa-minus"></i> 会议取消 </a>
                                    <a class="btn btn-warning" key="ajax_meeting_edit" href="javascript:void(0);"><i class="fa fa-lg fa-edit"></i> 会议调整 </a>
                                    </c:if>
                                </div>

                                <div class="f_title"><i class="right" id="flow"></i>流程信息</div>
                                <div class="f_content" style="display:none">
                                    <div id="showFlow"></div>
                                </div>
                                <div class="f_title"><i class="right" id="next"></i>下一步骤提示</div>
                                <div class="f_content" style="display:none">
                                    <div id="showNext"></div>
                                </div>
                            </div>

                        </form>
                        <!--===================================================-->
                        <!-- END BASIC FORM ELEMENTS -->

                    </div>

                    <div class="tab-pane fade" id="bsc-tab-2">
                        <div class="table-responsive" style="min-height: 530px;margin: 10px">
                            <table id="meeting_history_table"></table>
                            <div id="meeting_history_page"></div>
                        </div>
                    </div>

                    <div class="tab-pane fade" id="bsc-tab-3">
                        <form id="form_meeting_file" class="panel-body form-horizontal form-padding">
                            <c:choose>
                                <c:when test="${fileId != ''}">
                                    <%--<c:if test="${fileIds != ''}">--%>
                                    <div class="form-group">
                                        <label class="col-md-2 control-label">会议纪要</label>
                                        <div class="col-md-6">
                                            <input name="uploadify" id="filename" style="display: none"  placeholder="" type="file" >
                                            <input name="fileId" id="fileId" style="display: none" value="${fileId}">
                                        </div>
                                    </div>
                                    <%--</c:if>--%>
                                </c:when>
                                <c:otherwise>
                                    <%--<c:if test="${fileIds == ''}">--%>
                                    <div class="form-group">
                                        <label class="col-md-2 control-label"> 会议纪要</label>
                                        <div class="col-md-6">
                                            <input name="uploadify" id="filename" placeholder="" type="file" >
                                            <input name="fileId" id="fileId" style="display: none" value="${fileId}">
                                        </div>
                                        <div class="col-md-4">
                                            <a class="btn btn-warning" onclick="fn_meeting_upload_file()" href="javascript:void(0);"><i class="fa fa-upload"></i> 保存纪要 </a>
                                        </div>
                                    </div>
                                    <%--</c:if>--%>
                                    <%--<div class="form-group">--%>
                                        <%--<label class="col-md-2 control-label">--%>
                                            <%--会议纪要--%>
                                        <%--</label>--%>
                                        <%--<div class="col-md-6">--%>
                                            <%--<input name="uploadify" id="fileAttachment" placeholder="" type="file" >--%>
                                            <%--<input name="hiddenFiles" id="hiddenFilesAttachment" type="hidden" value="${meeting.fileAttachment}">--%>
                                        <%--</div>--%>
                                        <%--<div class="col-md-4">--%>
                                            <%--<a class="btn btn-warning" onclick="fn_meeting_upload_file()" href="javascript:void(0);"><i class="fa fa-upload"></i> 保存纪要 </a>--%>
                                        <%--</div>--%>
                                    <%--</div>--%>
                                </c:otherwise>
                            </c:choose>

                        </form>
                    </div>

                    <div class="tab-pane fade" id="bsc-tab-4">
                        <%--<div class="table-responsive" style="min-height: 530px;margin: 10px">--%>
                            <%--会议考勤--%>
                        <%--</div>--%>

                        <%--<div class="table-responsive" style="min-height: 530px;margin: 10px">--%>
                            <%--<table id="meeting_check_table"></table>--%>
                            <%--<div id="meeting_check_page"></div>--%>
                        <%--</div>--%>
                        <table class="table table-bordered" style="margin-top: 5px">
                            <thead>
                            <th>参会人员</th>
                            <th>考勤情况</th>
                            <th>考勤地点</th>
                            </thead>
                            <tbody id="meetingSign">
                            <c:forEach var="sign" items="${meeting.meetingSigns}"  varStatus="status">
                                <tr id="${sign.id}">
                                    <td>${sign.user.name}</td>
                                    <td>
                                        <div class="radio">
                                            <input type="radio" name="signType${status.index+1}" id="signType1Selected${status.index+1}" class="magic-radio" value="1"
                                            <c:if test="${sign.signType==1}"> checked="checked"</c:if> <c:if test="${sign.isSing==1}">disabled</c:if> >
                                            <label for="signType1Selected${status.index+1}">正常</label>

                                            <input type="radio" name="signType${status.index+1}" id="signType2Selected${status.index+1}" class="magic-radio" value="2"
                                            <c:if test="${sign.signType==2}"> checked="checked"</c:if> <c:if test="${sign.isSing==1}">disabled</c:if> >
                                            <label for="signType2Selected${status.index+1}">请假</label>

                                            <input type="radio" name="signType${status.index+1}" id="signType3Selected${status.index+1}" class="magic-radio" value="3"
                                            <c:if test="${sign.signType==3}"> checked="checked"</c:if> <c:if test="${sign.isSing==1}">disabled</c:if> >
                                            <label for="signType3Selected${status.index+1}">缺席</label>
                                        </div>
                                    </td>
                                    <td>
                                        <input id="signPlace${status.index+1}" name="signPlace${status.index+1}" class="form-control" value="${sign.signPlace}" <c:if test="${sign.isSing==1}">disabled</c:if> />
                                    </td>
                                </tr>
                            </c:forEach>
                            </tbody>
                        </table>
                            <div class="row" style="margin-left: 5px">
                                <input id="saveSign" type="button" class="btn btn-primary" value="保存" />
                            </div>

                    </div>

                </div>
            </div>

        </div>
    </div>
</div>

<script>

    //保存会议考勤
    $("#saveSign").click(function(){
        var meetingSignList=[];
        for(var i=0;i<$("#meetingSign tr").size();i++){
            var meetingSign=new Object();
            meetingSign.id=$("#meetingSign tr").eq(i).attr("id");
            meetingSign.signType=$("input[name='signType"+(i+1)+"']:checked").val();
            meetingSign.signPlace=$("#signPlace"+(i+1)).val();
            meetingSignList.push(meetingSign);
        }

        $.ajax({
            type:"POST",
            url: "<%=path%>/com/meeting/updateSign",
            dataType:"json",
            contentType:"application/json",
            data:JSON.stringify(meetingSignList),
            success:function(data){
                __toastr_success("操作成功");
                $("#apply-re-common").trigger("click");
            }
        });

    });

    var state = "${meeting.processState}";
    var index = "${index}";
    var todo = "${todo}";
    var remind = "${remind}";
    var record = "${record}";
    var draft =  "${draft}";
    var stepNo = "${stepNo}";

    $(function(){
        loadURL("<%=path%>/com/running/workflow?bussinessId="+$("input#keyId").val()+"&type=flow",$('#showFlow'));
        loadURL("<%=path%>/com/running/workflow?bussinessId="+$("input#keyId").val()+"&type=next",$('#showNext'));
        __ajax_post("<%=path%>/com/running/operateType",{keyId: $("input#keyId").val()},function(pdata){
            var showDuty = false;
            var area = $("form .panel-footer");
            var edit = null;
            if (stepNo == 1){
                return false;
            }
            $(pdata.datarows).each(function(i,v){
                var str = '<a id="left_foot_btn_'+ v.action+'" class="btn btn-warning" href="javascript:void(0);"><i class="fa fa-upload">'+ v.name+'</i></a>&nbsp;';
                $(area).append(str);
                if(v.action == "approve" || v.action=="sendback"  || v.action=="deny"){
                    showDuty = true;
                }
            });
            if(showDuty == true){
                var pdata = {
                    keyId: $("input#keyId").val(),
                    entityName: "com.fz.us.oa.core.entity.com.Meeting"
                };
                multiDuty(pdata);
            }else{
                $('#comment').hide();
            }
            if($(':visible#editor').length == 1){
                edit  = new UE.ui.Editor();
                edit.render('editor');
                /*
                 edit.ready(function() {
                 edit.setContent("");
                 });*/
            }
            //通过
            $("#left_foot_btn_approve").off("click").on("click",function(){
                var comment = "";
                if(edit != null){
                    comment = encodeURIComponent(edit.getContent());
                }
                if($.trim(comment) == ""){
                    alert("请填写审批意见");
                    return false;
                }
                __form_save("form_meeting_input","<%=path%>/com/meeting/approve?comment="+comment,function(){
                    $("#apply-re-common").trigger("click");
                })
            });
            //退回
            $("#left_foot_btn_sendback").off("click").on("click",function(){
                var comment = "";
                if(edit != null){
                    comment = encodeURIComponent(edit.getContent());
                }
                if($.trim(comment) == ""){
                    alert("请填写审批意见");
                    return false;
                }
                var vActionUrl="<%=path%>/com/meeting/back?comment="+comment+"&curDutyId="+$('#curDutyId').val();
                var data={keyId:$("input#keyId").val()};
                __ajax_post(vActionUrl,data,function(pdata){
                    __toastr(pdata);
                    $("#apply-re-common").trigger("click");
                });
            });
            //否决
            $("#left_foot_btn_deny").off("click").on("click",function(){
                var comment = "";
                if(edit != null){
                    comment = encodeURIComponent(edit.getContent());
                }
                if($.trim(comment) == ""){
                    alert("请填写审批意见");
                    return false;
                }
                var vActionUrl="<%=path%>/com/meeting/deny?comment="+comment+"&curDutyId="+$('#curDutyId').val();
                var data={keyId:$("input#keyId").val()};
                __ajax_post(vActionUrl,data,function(pdata){
                    __toastr(pdata);
                    $("#apply-re-common").trigger("click");
                });
            });
        });

        //流程信息展开
        $('#flow,#next').click(function(){
            if($(this).hasClass("right")){
                $(this).removeClass("right").addClass("down");
                $(this).parent(".f_title").next("div.f_content").show();
            }else{
                $(this).removeClass("down").addClass("right");
                $(this).parent(".f_title").next("div.f_content").hide();
            }
        });
    });

    <c:choose>
    <c:when test="${fileIds != null}">
    // 附件显示
    readLoad({
        objId:"filename",
        entityName:"fileIds",
        sourceId:"fileId"
    });
    </c:when>
    <c:otherwise>
    // 附件上传
    inputLoad({
        objId:"filename",
        entityName:"fileIds",
        sourceId:"fileId",
        jsessionid:"<%=jsessionid%>"
    });
    </c:otherwise>
    </c:choose>


    //返回视图
    $("#apply-re-common").click(function(){
        if(index==1){
            loadURL("menu/dashboard",$('#page-content'));
        }else if(todo==1){
            loadURL("menu/toDo",$('#page-content'));
        }else if(remind==1){
            loadURL("menu/remind",$('#page-content'));
        }else if(record==1){
            loadURL("menu/taskRecord?type=1",$('#page-content'));
        }else if(record==2){
            loadURL("menu/taskRecord?type=2",$('#page-content'));
        }else if(draft==1){
            loadURL("menu/draft",$('#page-content'));
        }else{
            returnToHashUrl()
        }
    });

    function fn_meeting_cancel_submit(keyId, reason){
        //ajax执行返回时触发
        var url = '<%=path %>/com/meeting/cancel';
        var data = { keyId: keyId, cancelReason: reason};
        __ajax_post(url, data, function(data){
            __toastr(data);
            if(data.state == 1) {
                $("#apply-re-common").trigger("click");
            }
        });
    }

    $("a[key='ajax_meeting_cancel']").unbind("click").bind("click",function(){
        __confirm_dialog_input('取消原因', '请输入取消原因', "", function (dialogRef, inputValue) {
            if (inputValue) {
                dialogRef.close();

                fn_meeting_cancel_submit($("#keyId").val(), inputValue);
            } else {
                dialogRef.enableButtons();

                __toastr_warning('请输入取消原因');
            }
        });

    });

    //编辑
    $("a[key='ajax_edit']").unbind("click").bind("click",function(){
        __confirm_dialog("提示：","确定要修改会议吗？",
            function () {
                // 加载编辑页面
                loadURL("<%=path%>/com/meeting/input?keyId="+$("#keyId").val()+"&draft="+draft+"&todo="+todo+"&remind="+remind+"&record="+record+"&index="+index,$('#page-content'));
            }
        )
    });

    //会议调整
    $("a[key='ajax_meeting_edit']").unbind("click").bind("click",function(){
        __confirm_dialog("提示：","确定要修改会议吗？",
                function () {
                    // 加载编辑页面
                    loadURL("<%=path%>/com/meeting/input?keyId="+$("#keyId").val()+"&meet=1"+"&draft="+draft+"&todo="+todo+"&remind="+remind+"&record="+record+"&index="+index,$('#page-content'));
                }
        )
    });

    function fn_meeting_upload_file() {
        $.ajax({
            url: '<%=path%>/com/meeting/uploadfile',
            type: "POST",
            cache: false,
            dataType: 'json',
            data: {
                keyId: $("#keyId").val(),
                fileIds: $("#fileIds").val()
            },
            success: function(data) {
                __toastr(data);
                $("#apply-re-common").trigger("click");
            },
            error:function() {
                __toastr_error('上传数据出错');
            }
        });
    }

    // 加载完成后执行
    $(function(){
        var aidSets = $("#aidSetsSpan").text();
        if(aidSets.indexOf("07")>-1){
            $("#otherSetDiv").show();
        } else {
            $("#otherSetDiv").hide();
        }

        init_grid_meeting_history();
        jQuery("#meeting_history_table").jqGrid('setGridWidth',  $("#bsc-tab-1").width()-66);
    })

    function init_grid_meeting_history() {

        var updateUnid=$("#updateUnid").val();
        if(updateUnid==""||updateUnid==null){
            updateUnid=$("#keyId").val();
        }

        __init_jqgrid('meeting_history_table', 'meeting_history_page',
            '<%=path%>/com/meeting/listHistory?updateUnid='+updateUnid,
            ['会议名称', '会议地点', '会议负责人', '调整日期', '操作', 'id'],
            [
                {name: 'name', index: 'name', width: 150, sortable: true, search: true, searchoptions: {sopt: ['cn']}},
                {name: 'address', index: 'address', width: 100, sortable: true, search: true, searchoptions: {sopt: ['cn']}},
                {name: 'chief', index: 'chief', width: 80, sortable: true, search: true, searchoptions: {sopt: ['cn']}},
                {name: 'dateUpdate', index: 'dateUpdate', width: 80, sortable: true, search: true, searchoptions: {sopt: ['cn']}},
                {name: 'act', index: 'act', width: 100, fixed: true, sortable: false, search: false, formatter: actFormat},
                {name: 'id', index: 'id', width: 100, key: true, hidden: true, hidedlg: true}
            ],
            true,true
        );

    }

    function actFormat(cellvalue, options, rowObject){
        var id = rowObject.id;
        cellvalue = '<button class="btn btn-white btn-sm" data-original-title="查看" onclick="fn_meeting_read(\'' + id + '\');"><i class="fa fa-eye"> </i> 查看</button> ';
        return cellvalue;
    }

    function fn_meeting_read(id) {
        var url = '<%=path%>/com/meeting/readHistory?keyId='+id;
        __open_dialog_form_read('会议安排', url);
    }
</script>




